package com.seckill.dao;

import com.seckill.entity.SuccessKilled;
import org.apache.ibatis.annotations.Param;

/**
 * Created by chengweixin on 2017/4/24.
 */
public interface SuccessKilledDao {

    /**
     * 插入购买明细, 可过滤重复
     *
     * @param seckillId
     * @param userPhone
     * @return
     */
    int insertSuccessKilled(@Param("seckillId") long seckillId,@Param("userPhone") long userPhone);

    /**
     * 根据id查询成功记录,并携带秒杀商品
     *
     * @param seckillId
     * @return
     */
    SuccessKilled getSuccessKilledWithSeckill(@Param("seckillId") long seckillId,@Param("userPhone") long userPhone);

}
